package com.example.secondhandshop.ui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.ImageView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.example.secondhandshop.R;
import com.example.secondhandshop.ui.fragment.PersonFragment;

public class Person_data extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.personal_data); // 设置布局文件

        // 获取头像ImageView和More按钮ImageButton
        ImageView imageViewAvatar = findViewById(R.id.imageViewAvatar);
        ImageButton buttonMoreAvatar = findViewById(R.id.buttonMoreAvatar);
        ImageButton backButton = findViewById(R.id.buttonBack);

        // 设置头像点击事件
        imageViewAvatar.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(Person_data.this, AvatarActivity.class);
                startActivity(intent);
            }
        });

        // 设置More按钮点击事件
        buttonMoreAvatar.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(Person_data.this, AvatarActivity.class);
                startActivity(intent);
            }
        });

        //返回按钮
        backButton.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });

    }
}